<?php
namespace Admin\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
        // 查询最大阅读数
    	$news = D("News")->maxcount();
        // 获取文章总数
    	$newscount = D("News")->getNewsCount(['status'=>1]);
        // 获取推荐位数
    	$positionCount = D("Position")->getCount(['status'=>1]);
        // 获取今日登录用户数
    	$adminCount = D("Admin")->getLastLoginUsers();
    	// var_dump($news);die;
    	$this->assign('news',$news);
    	$this->assign('newscount',$newscount);
    	$this->assign('positioncount',$positionCount);
    	$this->assign('adminCount',$adminCount);
        $this->display();
    }
}